home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIDownload.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  112 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Blake Ross <blaker@netscape.com>
  24.  *
  25.  * Alternatively, the contents of this file may be used under the terms of
  26.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  27.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  28.  * in which case the provisions of the GPL or the LGPL are applicable instead
  29.  * of those above. If you wish to allow use of your version of this file only
  30.  * under the terms of either the GPL or the LGPL, and not to allow others to
  31.  * use your version of this file under the terms of the MPL, indicate your
  32.  * decision by deleting the provisions above and replace them with the notice
  33.  * and other provisions required by the GPL or the LGPL. If you do not delete
  34.  * the provisions above, a recipient may use your version of this file under
  35.  * the terms of any one of the MPL, the GPL or the LGPL.
  36.  *
  37.  * ***** END LICENSE BLOCK ***** */
  38.  
  39. #include "nsITransfer.idl"
  40.  
  41. interface nsIURI;
  42. interface nsILocalFile;
  43. interface nsIObserver;
  44. interface nsICancelable;
  45. interface nsIWebProgressListener;
  46. interface nsIMIMEInfo;
  47.  
  48. [scriptable, uuid(9e1fd9f2-9727-4926-85cd-f16c375bba6d)]
  49. interface nsIDownload : nsITransfer {
  50.     
  51.     /**
  52.      * The target of a download is always a file on the local file system.
  53.      */
  54.     readonly attribute nsILocalFile targetFile;
  55.  
  56.     /**
  57.      * The percentage of transfer completed.
  58.      * If the file size is unknown it'll be -1 here.
  59.      */
  60.     readonly attribute PRInt32 percentComplete;
  61.  
  62.     /**
  63.      * The amount of kbytes downloaded so far.
  64.      */
  65.     readonly attribute PRUint64 amountTransferred;
  66.  
  67.     /**
  68.      * The size of file in kbytes.
  69.      * Unknown size is represented by 0.
  70.      */
  71.     readonly attribute PRUint64 size;
  72.     
  73.     /**
  74.      * The source of the transfer.
  75.      */
  76.     readonly attribute nsIURI source;
  77.     
  78.     /**
  79.      * The target of the transfer.
  80.      */
  81.     readonly attribute nsIURI target;
  82.  
  83.     /**
  84.      * Object that can be used to cancel the download.
  85.      * Will be null after the download is finished.
  86.      */
  87.     readonly attribute nsICancelable cancelable;
  88.  
  89.     /**
  90.      * The user-readable description of the transfer.
  91.      */
  92.     readonly attribute wstring displayName;
  93.  
  94.     /**
  95.      * The time a transfer was started.
  96.      */
  97.     readonly attribute long long startTime;
  98.     
  99.     /**
  100.      * Optional. If set, it will contain the target's relevant MIME information.
  101.      * This includes it's MIME Type, helper app, and whether that helper should be
  102.      * executed.
  103.      */
  104.     readonly attribute nsIMIMEInfo MIMEInfo;
  105. };
  106.  
  107. %{C++
  108. // {E3FA9D0A-1DD1-11B2-BDEF-8C720B597445}
  109. #define NS_DOWNLOAD_CID \
  110.     { 0xe3fa9d0a, 0x1dd1, 0x11b2, { 0xbd, 0xef, 0x8c, 0x72, 0x0b, 0x59, 0x74, 0x45 } }
  111. %}
  112.